package avicit.bdp.dgs.mdm.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.Id;
import avicit.platform6.core.annotation.log.LogField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.List;

/**
 * @金航数码科技有限责任公司
 * @作者：developer
 * @邮箱：developer@avic-digital.com
 * @创建时间： 2023-12-04
 * @类说明：ColumnDTO
 * @修改记录：
 * @注意事项：
 * @主要功能：字段DTO
 */
@ApiModel(value = "ColumnDTO", description = "字段DTO")
@Table(name = "bdp_dgs_mdm_column")
public class ColumnDTO extends BaseDTO {
    /**
     * 主键
     */
    @Id
    @LogField
    @ApiModelProperty(value = "id", name = "id")
    @FieldRemark(column = "id", field = "id", name = "主键")
    @javax.persistence.Id
    @Column(name = "id")
    private String id;

    /**
     * 字段英文名
     */
    @LogField
    @ApiModelProperty(value = "字段英文名", name = "name")
    @FieldRemark(column = "name", field = "name", name = "字段英文名")
    @Column(name = "name")
    private String name;

    /**
     * 修改前字段名
     */
    @LogField
    @ApiModelProperty(value = "字段英文名", name = "nameOld")
    @FieldRemark(column = "name_old", field = "nameOld", name = "修改前字段名")
    @Column(name = "name_old")
    private String nameOld;

    /**
     * 字段中文名
     */
    @LogField
    @ApiModelProperty(value = "字段中文名", name = "cnName")
    @FieldRemark(column = "cn_name", field = "cnName", name = "字段中文名")
    @Column(name = "cn_name")
    private String cnName;

    /**
     * 字段备注
     */
    @LogField
    @ApiModelProperty(value = "字段备注", name = "remark")
    @FieldRemark(column = "remark", field = "remark", name = "字段备注")
    @Column(name = "remark")
    private String remark;

    /**
     * 字段类型
     */
    @LogField
    @ApiModelProperty(value = "字段类型", name = "columnType")
    @FieldRemark(column = "column_type", field = "columnType", name = "字段类型")
    @Column(name = "column_type")
    private String columnType;

    /**
     * 字段长度
     */
    @LogField
    @ApiModelProperty(value = "字段长度", name = "columnLength")
    @FieldRemark(column = "column_length", field = "columnLength", name = "字段长度")
    @Column(name = "column_length")
    private Integer columnLength;

    /**
     * 字段精度
     */
    @LogField
    @ApiModelProperty(value = "字段精度", name = "columnPrecision")
    @FieldRemark(column = "column_precision", field = "columnPrecision", name = "字段精度")
    @Column(name = "column_precision")
    private Integer columnPrecision;

    /**
     * 是否为空， 0：否、1：是
     */
    @LogField
    @ApiModelProperty(value = "是否为空， 0：否、1：是", name = "nullable")
    @FieldRemark(column = "nullable", field = "nullable", name = "是否为空， 0：否、1：是")
    @Column(name = "nullable")
    private Integer nullable;

    /**
     * 是否主键， 0：否、1：是
     */
    @LogField
    @ApiModelProperty(value = "是否主键， 0：否、1：是", name = "primarykey")
    @FieldRemark(column = "primarykey", field = "primarykey", name = "是否主键， 0：否、1：是")
    @Column(name = "primary_key")
    private Integer primaryKey;

    /**
     * 是否唯一， 0：否、1：是
     */
    @LogField
    @ApiModelProperty(value = "是否唯一， 0：否、1：是", name = "uniquekey")
    @FieldRemark(column = "uniquekey", field = "uniquekey", name = "是否唯一， 0：否、1：是")
    @Column(name = "unique_key")
    private Integer uniqueKey;

    /**
     * 是否外键， 0：否、1：是
     */
    @LogField
    @ApiModelProperty(value = "是否外键， 0：否、1：是", name = "foreignKey")
    @FieldRemark(column = "foreignKey", field = "foreignKey", name = "是否外键， 0：否、1：是")
    @Column(name = "foreign_key")
    private Integer foreignKey;

    /**
     * 所属表ID
     */
    @LogField
    @ApiModelProperty(value = "所属表ID", name = "tableId")
    @FieldRemark(column = "table_id", field = "tableId", name = "所属表ID")
    @Column(name = "table_id")
    private String tableId;

    /**
     * 引入标准ID
     */
    @LogField
    @ApiModelProperty(value = "引入标准ID", name = "standardId")
    @FieldRemark(column = "standard_id", field = "standardId", name = "引入标准ID")
    @Column(name = "standard_id")
    private String standardId;

    /**
     * 是否可修改，0：否、1：是
     */
    @LogField
    @ApiModelProperty(value = "是否可修改，0：否、1：是", name = "modifyable")
    @FieldRemark(column = "modifyable", field = "modifyable", name = "是否可修改，0：否、1：是")
    @Column(name = "modifyable")
    private Integer modifyable;

    /**
     * 排序
     */
    @LogField
    @ApiModelProperty(value = "排序", name = "orderBy")
    @FieldRemark(column = "order_by", field = "orderBy", name = "排序")
    @Column(name = "order_by")
    private Integer orderBy;

    /**
     * 输入类型，0:输入框、1:选择器、2:数字输入框、3:时间选择器、4:日期选择器
     */
    @Transient
    private Integer inputType;
    @Transient
    private String inputTypeName;

    /**
     * 默认值
     */
    @Transient
    private List<String> defaultValueList;

    @Transient
    private String userName;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNameOld() {
        return nameOld;
    }

    public void setNameOld(String nameOld) {
        this.nameOld = nameOld;
    }

    public String getCnName() {
        return cnName;
    }

    public void setCnName(String cnName) {
        this.cnName = cnName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public Integer getColumnLength() {
        return columnLength;
    }

    public void setColumnLength(Integer columnLength) {
        this.columnLength = columnLength;
    }

    public Integer getColumnPrecision() {
        return columnPrecision;
    }

    public void setColumnPrecision(Integer columnPrecision) {
        this.columnPrecision = columnPrecision;
    }

    public Integer getNullable() {
        return nullable;
    }

    public void setNullable(Integer nullable) {
        this.nullable = nullable;
    }

    public Integer getPrimaryKey() {
        return primaryKey;
    }

    public void setPrimaryKey(Integer primaryKey) {
        this.primaryKey = primaryKey;
    }

    public Integer getUniqueKey() {
        return uniqueKey;
    }

    public void setUniqueKey(Integer uniqueKey) {
        this.uniqueKey = uniqueKey;
    }

    public Integer getForeignKey() {
        return foreignKey;
    }

    public void setForeignKey(Integer foreignKey) {
        this.foreignKey = foreignKey;
    }

    public String getTableId() {
        return tableId;
    }

    public void setTableId(String tableId) {
        this.tableId = tableId;
    }

    public String getStandardId() {
        return standardId;
    }

    public void setStandardId(String standardId) {
        this.standardId = standardId;
    }

    public Integer getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(Integer orderBy) {
        this.orderBy = orderBy;
    }

    public Integer getModifyable() {
        return modifyable;
    }

    public void setModifyable(Integer modifyable) {
        this.modifyable = modifyable;
    }

    public Integer getInputType() {
        return inputType;
    }

    public void setInputType(Integer inputType) {
        this.inputType = inputType;
    }

    public String getInputTypeName() {
        return inputTypeName;
    }

    public void setInputTypeName(String inputTypeName) {
        this.inputTypeName = inputTypeName;
    }

    public List<String> getDefaultValueList() {
        return defaultValueList;
    }

    public void setDefaultValueList(List<String> defaultValueList) {
        this.defaultValueList = defaultValueList;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
}
